<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CinnamonReader</title>

<link rel="stylesheet" type="text/css" href="./resources/style.css">
<link rel="stylesheet" type="text/css" href="resources/css/bootstrap.min.css">

</head>
<body>
	<div>
		<h2>Sign in to CinnamonReader</h2>
		<form class="well span3" style="width: 350px" method="post" action="./j_spring_security_check"> <!-- action="./{path-to-login-processing-url}" "./j_spring_security_check"-->
			<fieldset style="border: none;">
				<table cellspacing="0" border="0">
					<tr>
						<th><label>Username</label></th>
						<td><input name="j_username" type="text" class="span3" placeholder="Type login here..."/></td>
						<td>
							<!-- INVALID LOGIN -->
							<%  Object req = request.getParameter("auth");
									if ((req != null) && (req.equals("false"))) {%>	
									<font color="red">Invalid username or password.</font>
							<%}%>	
						</td>
					</tr>
					<tr>
						<th><label>Password</label></th>
						<td>
							<input name="j_password" type="password" class="span3" placeholder="Type password here..."/>
							<!-- ********************     TO DO  "forgot password"   *******************   -->
							<%-- <small><a href="/account/resend_password">Forgot?</a></small> --%>
						</td>
					</tr>
					<tr>
						<th></th>
						<td>
							<!-- *********************     TO TEST  "remember me"    ********************   -->
							<input id="remember_me"	name="_spring_security_remember_me" type="checkbox" />
							<label for="remember_me" class="inline">Remember me</label>
						</td>
					</tr>
					<tr>
						<th></th>	
						<td align="left">
							<input name="commit" type="submit" value="Sign In" class="btn btn-primary"/> 							
						</td>	
					</tr>					
				</table>
			</fieldset>
		</form>		
	</div>
	<br>
	
	<!-- <p>If you've been using CinnamonReader from your phone, then that's
			amazing...we don't support it yet.</p> -->
	If you are not registered yet, you can <a href="./register.jsp" >register here!</a>

</body>
</html>